/* eslint-disable @typescript-eslint/no-unsafe-call */
import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common';
import { PrismaClient } from '@prisma/client';

@Injectable()
export class PrismaService
  extends PrismaClient<any, any, any>
  implements OnModuleInit, OnModuleDestroy
{
  // constructor() {
  //   super();
  // }
  async onModuleInit() {
    await this.$connect();
    // await this.onModuleInit();
  }

  async onModuleDestroy() {
    await this.$disconnect();
    // await this.onModuleDestroy();
  }
}
